package com.caiyouxi.app.controller;

import com.caiyouxi.app.model.AppVersionBean;
import com.caiyouxi.app.service.AppVersionService;
import com.caiyouxi.app.service.AppVersionServices;
import com.caiyouxi.common.bean.ResData;
import com.caiyouxi.common.service.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("app_version")
public class AppVersionController extends BaseService{
    @Autowired
    private AppVersionServices services;
    @Autowired
    private AppVersionService appVersionService;

    /**
     * 删除
     * */
    @RequestMapping("delete_app_version")
    public ResData delete_app_version(@RequestBody AppVersionBean bean){
        return services.delete_app_version(bean);
    }

    /**
     * 查询单条数据
     * */
    @RequestMapping("select_app_version")
    public  ResData select_app_version(@RequestBody AppVersionBean bean){
        return services.select_app_version(bean);
    }

    /**
     * 更新单条数据
     * */
    @RequestMapping("update_app_version")
    public ResData update_app_version(@RequestBody AppVersionBean bean){
        return services.update_app_version(bean);
    }

    /**
     * 查询所有
     * */
    @RequestMapping("select_appversion_list")
    public ResData selectAll(@RequestBody AppVersionBean bean){
        return services.select_appversion_list(bean);
    }

    /**
     * 添加
     * */
    @RequestMapping("add_app_version")
    public ResData add_app_version(@RequestBody AppVersionBean bean){
         return success(appVersionService.add_app_sdk_config(bean));
    }
}
